package com.sqx.modules.trends.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sqx.common.utils.Result;
import com.sqx.modules.trends.entity.Trends;
import com.sqx.modules.trends.entity.TrendsType;
import com.sqx.modules.trends.vo.TrendsVo;

/**
 * 用户动态 服务类
 *
 * @author wuChang
 * @since 2023-09-26
 */

public interface ITrendsService extends IService<Trends> {
    /**
     * 新增或修改用户动态
     */
    Result saveTrends(Trends trends);

    /**
     * 获取该用户动态列表
     */
    IPage<TrendsVo> getTrendsList(Integer page, Integer limit, Long byUserId, TrendsVo trendsVo);

    Result getAllTrendsList(Integer page, Integer limit, Long byUserId, Long userId, Integer searchType, TrendsVo trendsVo);

    Result selectDynamicHomepage(Integer page, Integer limit, Integer type, Long userId, Long byUserId);

    Result selectDynamicCount(Long userId, Long byUserId);

    Result deleteTrends(Long userId, Long trendsId);

    Result examineTrends(Integer status, Long trendsId, String auditContent);

    TrendsVo getTrendsInfo(Long userId, Long byUserId, Long trendsId);

    /**
     * 添加或修改动态类型
     *
     * @param trendsType
     * @return
     */
    Result addTrendsType(TrendsType trendsType);

    /**
     * 删除动态类型
     *
     * @param id
     * @return
     */
    Result deleteTrendsType(Long id);

    /**
     * 查询动态类型列表
     *
     * @param page
     * @param limit
     * @param trendsType
     * @return
     */
    Result selectTrendsTypeList(Integer page, Integer limit, TrendsType trendsType);

    /**
     * 查询动态类型详情
     *
     * @param id
     * @return
     */
    Result selectTrendsTypeDetail(Long id);

    Result selectDynamicGoods(Integer page, Integer limit, Long userId, Long byUserId);


    Result selectDynamicTrends(Integer page, Integer limit, Long userId, Long byUserId);

    Result selectDynamicComments(Integer page, Integer limit, Long userId, Long byUserId);

    /**
     * 删除动态(假删除)
     */
    Result fakeDeletionTrends(Long trendsId);

    Result deleteTrendsById(Long trendsId);

    Result updateTrendsLike(Long trendsId, Integer virtualLikeCount);

    Result updateTrendsBrowse(Long trendsId, Integer virtualViewCount);

    Result getTrendsListByAdmin(Integer page, Integer limit, Long byUserId, TrendsVo trendsVo);
}
